home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 2: Applications
/
Linux Cubed Series 2 - Applications.iso
/
circuits
/
irsim-ca.2
/
irsim-ca
/
irsim-cap-9.2
/
man
/
irsim-cap.doc
< prev
next >
Wrap
Text File
|
1995-11-03
|
14KB
|
397 lines
IRSIM-CAP(1) USER COMMANDS IRSIM-CAP(1)
NAME
irsim-cap
A version of the event-driven logic-level simulator,
IRSIM-9.0, with extensions for improved capacitance
measurements.
SYNOPSIS
irsim-cap [-s] prm_file sim_file ... [+hist_file] [-cmd_file
...]
DESCRIPTION
IRSIM-CAP is an event-driven logic-level simulator for MOS
(both N and P) transistor circuits. It is based on IRSIM-
9.0 with certain extensions to allow improved ease and accu-
racy when measuring switching capacitances. This man page
describes only the differences between IRSIM-9.0 and IRSIM-
CAP. For a description of the basic IRSIM commands see the
"irsim(1)" man page.
ESTIMATING CAPS WITH IRSIM-9.0
IRSIM-9.0 itself has a number of commands to aid the user in
estimating switching capacitance. They are described below:
caplogfile [[+]file]
This command turns on the feature which accumulates
transitions on capacitive nodes. It also starts a log
file which contains a list of all capacitive transi-
tions with columns for:
1) the time of the event,
2) the name of the switching node,
3) its old and new values,
4) the rise time and delay of the event, and
5) the physical capacitance being switched.
captrace [-]node/vector
This command determines which nodes will be watched for
capacitive transitions. For example, "captrace *"
causes all nodes to be watched.
sumcap
This command sums the physical (not switching) capaci-
tance of all nodes in the circuit.
logfile [[+]file]
This command starts a logfile of all simulation output,
which upon conclusion of the simulation will contain a
summary of accumulated switching capacitances for all
nodes. By column, this summary includes:
1) the name of the node,
2) the physical capacitance on that node,
3) the number of transitions that node made,
4) the transition-capacitance product (i.e. the
Sun Release 4.1 Last change: December 1993 1
IRSIM-CAP(1) USER COMMANDS IRSIM-CAP(1)
effective switching capacitance), and
5) the fraction of the total chip switching
capacitance that the node accounts for.
PROBLEMS WITH IRSIM-9.0
There are, however, a number of problems with estimating
switching capacitance using these commands:
1) IRSIM-9.0 does not count transitions on primary inputs.
This can be a problem if you're characterizing a module
and want to include it's input gate capacitance in the
results.
2) IRSIM-9.0 is not particularly clever in how it counts
transitions. {L, X, and H} are all considered dif-
ferent states and a change between any of these is con-
sidered a transition. What we're really interested in
is the number of energy consuming (low to high) transi-
tions. Now if there were only L and H states then for
long simulations the number of L->H transitions would
just be the total number of transitions that IRSIM-9.0
gives you divided by two.
But the X state complicates matters and can cause a
serious overestimate of switching capacitance. For
example, if a node passes through the X state on its
rise from L to H (L->X->H), two transitions will be
counted when actually only one charging occurred. A
similar problem occurs when a node temporarily glitches
(e.g. L->X->L).
Counting "transitions" also presents a problem when
trying to calculate the energy drawn from the supply
over a short sequence of events. For example, if only
one step is simulated, during which a node discharges
from H->L, then even though no energy was drawn from
the supply the "transition" count is non-zero.
3) "sumcap" is not particularly useful since it sums the
physical capacitance of all nodes including Vdd and
GND, which don't even switch. What we'd really like is
to sum the effective 0->1 switching capacitance.
4) IRSIM-9.0 offers no easy way to calculate the capaci-
tance switched during individual events in a long simu-
lation sequence. Instead, you must simulate each event
separately and output a different capacitance summary
into multiple log files.
5) We'd like to be able to tell how much energy is con-
sumed by each of the different components of a chip.
This is very difficult since sim files are flat and
Sun Release 4.1 Last change: December 1993 2
IRSIM-CAP(1) USER COMMANDS IRSIM-CAP(1)
it's nearly impossible to tell what capacitance
belonged to what cell originally.
ESTIMATING CAPS WITH IRSIM-CAP
IRSIM-CAP attempts to solve some of these problems through
several additional commands. These commands are extensions,
however, and you should still be able to use the old com-
mands to duplicate your earlier results. NOTE: issuing a
"caplogfile" command is no longer necessary to enable tran-
sition counting.
inputcap [on | off]
This command enables you to include transitions on pri-
mary inputs in your capacitance estimations. It does
not, however, consider changes in Vdd and GND since
these only switch once during power up and including
this energy would swamp out the nodal transitions in
which you're actually interested. Without any argu-
ments "inputcap" returns the current setting of the
flag.
sumeffcap [[+]file]
IRSIM-CAP keeps track of 0->1 transitions as well as
"transitions". It also employs a slightly improved
accumulation scheme where L->H counts as 1 transition,
X->H counts as 0.5 transitions, and L->X counts as 0.5
transitions. "sumeffcap" outputs the total effective
capacitance that has been charged from 0->1 so far.
Output goes either to the screen or a file (+file
causes the result to be appended to the file). The
energy drawn from the supply to accomplish this charg-
ing is, of course, Ceff*Vdd^2.
zeropower
This command zeros out the accumulated transition
counts for all nodes in the circuit. In conjunction
with "sumeffcap", this allows you to easily output the
capacitance switched during individual cycles of your
overall simulation.
fprint [+]file [text...]
Output the specified text to file. If no text is
specified a blank line is inserted. The '+' prefix
specifies the append option rather than overwrite.
This command could be used in conjunction with the
'sumeffcap [+]file' command to annotate the output
file.
capreport [[+]file]
This command produces a report somewhat similar to that
discussed in "logfile" above. I wrote it in an attempt
Sun Release 4.1 Last change: December 1993 3
IRSIM-CAP(1) USER COMMANDS IRSIM-CAP(1)
to give the user the ability to figure out the capaci-
tance switched within individual modules in a larger
chip.
Since the sim files are flat, a single node can actu-
ally represent capacitances from many different inter-
connected modules on the chip. But since the nodes
from the different modules have been collapsed into one
node in the sim file, there's no way to tell which
cells may have originally contributed to the collapsed
nodal capacitance or how much of a contribution each
module may have made.
If IRSIM was at least aware of the names of all the
nodes that contributed capacitance to the collapsed
node, then at least some guess could be made as to how
much each node contributed. Fortunately, an alias file
(*.al) is generated along with each sim file. By load-
ing this in with the sim file using:
irsim-cap my.prm my.sim my.al -my.cmds
IRSIM-CAP becomes aware of how many nodes originally
contributed to the capacitance of each collapsed node.
Furthermore, often by looking at the aliased node names
(e.g. adder0/B[15] or adder0/add_cs_0_0/COUTINV) you
can tell to what cell the node originally belonged.
Then as an approximation, we can split the lumped node
capacitance evenly among all contributing nodes (since
there's no way to derive a more accurate distribution
from the sim file).
"capreport" facilitates this procedure. For each node
and each node alias, it produces an entry which states:
1) the name of the node or alias,
2) the number of equivalent nodes contributing
to the collapsed node,
3) the portion of the physical node capacitance
attributed to this particular component node,
4) the number of 0->1 transition on the node,
and
5) the effective capacitance charged from 0->1
for this component node.
The output of "capreport" can be grep'd through to
split the capacitance results into different com-
ponents. For example, here's a script I used to parti-
tion the results of an adder simulation among the vari-
ous bits:
#! /bin/csh -f
rm -f bit.energy
Sun Release 4.1 Last change: December 1993 4
IRSIM-CAP(1) USER COMMANDS IRSIM-CAP(1)
foreach n (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
echo "Extracting bit $n"
echo -n "bit$n- " >> bit.energy
egrep "[$n]|bit[^/]*_$n/" cap.report | \
chop -f5 | sum >> bit.energy
end
echo "Extracting non-bit nodes"
echo -n "Remainder- " >> bit.energy
egrep -v "[[0-9]*]|bit" cap.report | chop -f5 | \
sum >> bit.energy
CAVEATS
Neither IRSIM-9.0 nor IRSIM-CAP store transition counts dur-
ing any of their "dump" commands. As a result you can't
start a simulation, stop and save it, and continue it later
expecting to get the correct accumulated capacitance
results. If memory usage is becoming a problem you can,
however, use the "flush" command to erase the event history
up to the current simulation time. This does not adversely
affect transition counts for either IRSIM-9.0 or IRSIM-CAP.
ON-LINE HELP
Try "help [inputcap | sumeffcap | zeropower | fprint |
capreport]" from within IRSIM-CAP.
EXAMPLE COMMAND FILE
model linear
vector IN1 IN1[{15:0}]
vector IN2 IN2[{15:0}]
vector OUT OUT[{15:0}]
h Vdd
l GND
analyzer IN1 IN2
analyzer OUT
inputcap ON
captrace *
|
| Set initial inputs
|
set IN1 1010000100000010
set IN2 1100000110111101
s 100
|
| Make transition and output incremental capacitance
|
zeropower
Sun Release 4.1 Last change: December 1993 5
IRSIM-CAP(1) USER COMMANDS IRSIM-CAP(1)
set IN1 1001111110111110
set IN2 0101000010011011
s 100
fprint cap.summary EFFECTIVE INCREMENTAL CAPS:
fprint +cap.summary
sumeffcap +cap.summary
|
| Make transition and append incremental capacitance
|
zeropower
set IN1 1011010110111010
set IN2 0101101010011111
s 100
sumeffcap +cap.summary
fprint +cap.summary
fprint +cap.summary END OF SIMULATION
|
| Output capacitances including info. about aliased nodes
|
capreport cap.report
exit
SEE ALSO
irsim(1)
presim(1) (now obsolete)
rsim(1)
IRSIM-analyzer(3)
sim(5)
netchange(5)
AUTHORS
irsim-9.0 is copyrighted (C) 1988, 1990 by Stanford University under the
following copyright notice:
*********************************************************************
* Copyright (C) 1988, 1990 Stanford University. *
* Permission to use, copy, modify, and distribute this *
* software and its documentation for any purpose and without *
* fee is hereby granted, provided that the above copyright *
* notice appear in all copies. Stanford University *
* makes no representations about the suitability of this *
* software for any purpose. It is provided "as is" without *
* express or implied warranty. Export of this software outside *
* of the United States of America may require an export license. *
*********************************************************************
Capacitance modifications for irsim-cap were performed by Paul Landman,
UC Berkeley, 1993, and they are also provided "as is" without express
or implied warranty.
Sun Release 4.1 Last change: December 1993 6